<template id="temp">
  <!-- vue实例外创建 -->
  <div style="border: 1px solid blue">
    <h1>子组件</h1>
    <el-progress
      type="dashboard"
      :percentage="num"
      :color="colors"
    ></el-progress>
  </div>
</template>
<!-- 调用   <mycom></mycom> -->
<script>
export default {
  data() {
    return {
      colors: [
        { color: '#f56c6c', percentage: 20 },
        { color: '#e6a23c', percentage: 40 },
        { color: '#5cb87a', percentage: 60 },
        { color: '#1989fa', percentage: 80 },
        { color: '#6f7ad3', percentage: 100 }
      ]
    };
  },
  props: ['num'],
}
</script>